<script setup lang="ts">
definePageMeta({
  layout: "tab-bar",
});

const router = useRouter();
const num = ref(0);

onMounted(() => {
  // setTimeout(() => {
  //   router.replace({
  //     path: "/test",
  //   });
  // }, 2000);
  const el = document.createElement("a");
  const appId = "wx297b0f1f2e7c01eb";
  // el.href = "https://wxaurl.cn/wNcjCSLSp8j";
  // el.href = `weixin://dl/business/?appid=${appId}&path=pages/index/index&env_version=develop`;

  document.body.addEventListener("click", () => {
    // el.click();
    // window.location.href = `weixin://dl/business/?appid=${appId}&query=${query}&path=pages/index/index`;
  });
});
</script>

<template>
  <div class="page">首页 {{ num }}</div>
  <!--<a href="https://wxaurl.cn/wNcjCSLSp8j">打开</a>-->
</template>

<style scoped lang="scss">
.page {
  width: 100vw;
  height: 100vh;
}
</style>
